<?php
if($loggedin)
{
$ds = mysql_fetch_array(safe_query("SELECT * FROM ".PREFIX."user WHERE userID='".$userID."'"));
echo '<b>Username:</b> '.$ds['username'];

}
else
{
echo '<b>Not logged in</b>';
}

?>